package com.my12306.train.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.my12306.common.model.vo.PageVo;
import com.my12306.common.util.PageUtils;
import com.my12306.common.util.response.ResponseData;
import com.my12306.train.model.entity.TrainScheduleEntity;
import com.my12306.train.model.vo.TrainScheduleVo;

import java.util.List;

/**
 * 发车表(车次表)
 *
 * @author ËÕÄÁÏ¦
 * @email
 * @date 2020-07-24 20:58:07
 */
public interface TrainScheduleService extends IService<TrainScheduleEntity> {
    /**
     * 分页查询车次
     *
     * @param pageVo
     * @return
     */
    PageUtils queryTrainSchedulePage(PageVo pageVo);

    /**
     * 分页查询的总数
     *
     * @param pageVo
     * @param logicDelete
     * @return
     */
    Integer queryTrainScheduleCount(PageVo pageVo, int logicDelete);

    /**
     * 添加一条车次记录
     * @param trainSchedule
     * @return
     */
    Long saveTrainSchedule(TrainScheduleEntity trainSchedule);

    /**
     * 修改车次
     *
     * @param trainSchedule
     */
    void updateTrainScheduleById(TrainScheduleEntity trainSchedule);

    /**
     * 批量删除列车
     *
     * @param trainScheduleIds
     * @return
     */
    ResponseData deleteTrainScheduleBatchByIds(List<Long> trainScheduleIds);

    /**
     * 查询添加车次的相关参数
     * @return
     * @param id
     */
    ResponseData getAddParameters(Long id);

    /**
     * 根据id查询
     * @param id
     * @param logicDelete
     * @return
     */
    TrainScheduleVo queryTrainScheduleVoById(Long id, int logicDelete);

    /**
     * 查询所有车尺寸
     * @param logicDelete
     * @return
     */
    List<TrainScheduleEntity> queryAllTrainSchedule(int logicDelete);

    /**
     * 根据 车次代码查询车次信息
     * @param trainCode
     * @param logicDelete
     * @return
     */
    TrainScheduleEntity queryTrainScheduleByTrainCode(String trainCode, Integer logicDelete);
}

